# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=kio-gdrive
pkgver=1.3.0
pkgrel=0
arch="all !ppc64le !s390x !armhf !mips !mips64" # Blocked by libkgapi -> qt5-qtwebengine
url="https://community.kde.org/KIO_GDrive"
pkgdesc="KIO Slave to access Google Drive"
license="GPL-2.0-or-later"
depends="signon-plugin-oauth2 signon-ui"
makedepends="extra-cmake-modules qt5-qtbase-dev ki18n-dev kdoctools-dev kio-dev kaccounts-integration-dev libkgapi-dev intltool"
source="https://download.kde.org/stable/kio-gdrive/$pkgver/src/kio-gdrive-$pkgver.tar.xz"
subpackages="$pkgname-doc $pkgname-lang"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="b0a6be2b59512d3faf6c677c6f3ffdcc9a38fff3a41d0bc6a29566008d7da3ab524fb189ddd219308a8ac8244fbed67c01da480e8193ed0aeb815fe64d72988a  kio-gdrive-1.3.0.tar.xz"
